/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.datalayer.dao;

import cz.muni.fi.diplomka.datalayer.entity.AllianceEntity;
import java.util.List;

/**
 * Interface for manipulation with Alliance Entity
 *
 * @author Jakub Kutil
 */
public interface AllianceDao {

    /**
     * Adds new Alliance to DB
     *
     * @param allianceEntity Alliance to add
     */
    public void addAlliance(AllianceEntity allianceEntity);

    /**
     * Edits Alliance in DB
     *
     * @param allianceEntity Alliance to edit
     */
    public void editAlliance(AllianceEntity allianceEntity);

    /**
     * Deletes Alliance from DB
     *
     * @param allianceId ID of Alliance to delete
     */
    public void deleteAlliance(Long allianceId);

    /**
     * Gets all Alliances from DB
     *
     * @return List of all Alliances
     */
    public List<AllianceEntity> getAllAlliances();

    /**
     * Gets Alliance with specified name
     *
     * @param name name of Alliance to find
     *
     * @return found Alliance or empty one if not found
     */
    public AllianceEntity getAllianceByName(String name);

    /**
     * Gets Alliance in which player is
     *
     * @param playerId ID of player
     *
     * @return found Alliance or empty one if not found
     */
    public AllianceEntity getAllianceOfPlayer(Long playerId);
}
